<template>
  <div>
    <el-dialog
      title="资质证书信息"
      :visible.sync="show"
      width="1000px"
      append-to-body
      @close="cancel"
    >
      <el-form :model="info" label-width="140px">
        <el-row>
          <el-col :span="8">
            <el-form-item label="营业执照" prop="businessLicense">
              <Image-preview :src="info.businessLicense" :width="150" :height="150" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="药品经营许可证" prop="licenseForPharmaceuticalTrading">
              <Image-preview
                :src="info.licenseForPharmaceuticalTrading"
                :width="150"
                :height="150"
              />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="食品经营许可证" prop="foodBusinessLicense">
              <Image-preview :src="info.foodBusinessLicense" :width="150" :height="150" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="法人身份证人像面" prop="legalPersonIdentityCardFront">
              <Image-preview
                :src="info.legalPersonIdentityCardFront"
                :width="150"
                :height="150"
              />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="法人身份证国徽面" prop="legalPersonIdentityCardBack">
              <Image-preview
                :src="info.legalPersonIdentityCardBack"
                :width="150"
                :height="150"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="门头照片" prop="shopPhoto">
          <Image-preview :src="info.shopPhoto" multiple :width="150" :height="150" />
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>
<script>
export default {
  name: "StoreUser",
  props: {
    value: {
      type: Boolean,
      default: false,
    },
    // 门店信息
    info: {
      type: Object,
      default: () => {},
    },
  },
  computed: {
    show: {
      get() {
        return this.value;
      },
      set(val) {
        this.$emit("input", val);
      },
    },
  },
  data() {
    return {};
  },
  methods: {
    // 取消按钮
    cancel() {
      this.show = false;
      this.$emit("cancel");
    },
  },
};
</script>
<style lang="scss" scoped></style>
